<header class="demo-header">
    <div class="title3Left flt text-center header-small">
        <a href="javascript:history.back(-1);" class="whiteC">
        	<img src="/img/back.png" width="17px" class="backimg">返回
        </a>
    </div>
    <div class="title3Middle flt text-center">发布</div>
    <div class="title3Right flt text-center header-small">分享</div>
</header>
<div style="width: 90%;" class="div-center">
	<div class="padding-adjust5">发布完成，分享给您的朋友吧！</div>
	<input value="标题内容标题内容" onfocus="this.value='';" class="border3 img-width padding-adjust3"/>
    <div class="product-list newproduct two-lay" style="border: none;">
		<div>
			<div class="imgclass posre">
				<img src="/img/image.png" style="height: 80px;"/>
				<div class="uploadImg fbgh fontsize">
				    <label class="weilabel"><input type="file" accept="image/*" capture="camera">更换图片</label>
				</div>
			</div>
			<div class="flt pline product" style="line-height: 18px;padding-top: 0;">
				活动描述活动描述
			</div>
		</div>
	</div>
</div>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>

<script type="text/javascript">
	var title = '鲜店，新鲜菜，放心肉！';
	var desc = '我已在鲜店下单，还得了现金返现，亲你也来试试吧！';
	var link ='http://sg.test.renrencaichang.com/article/detail/?id='+<?php echo $this->id; ?>;
	var imgurl = 'http://shop.renrencaichang.com/images/hb_logo4.jpg';
	wx.config({
		debug: true,
		appId:      '<?php echo $this->result["appId"];?>',
		timestamp:  '<?php echo $this->result["timestamp"];?>',
		nonceStr:   '<?php echo $this->result["nonceStr"];?>',
		signature:  '<?php echo $this->result["signature"];?>',
		jsApiList: [
			'checkJsApi',
			'onMenuShareTimeline',
			'onMenuShareAppMessage',
			'onMenuShareQQ',
			'onMenuShareWeibo'
		]
	});
	wx.ready(function () {
		wx.onMenuShareTimeline({//分享朋友圈
			title: title,
			desc: desc,
			link: link,
			imgUrl: imgurl,
			trigger: function (res) {
			},
			success: function (res) {
				alert('分享成功');
			},
			cancel: function (res) {
				alert('已取消');
			},
			fail: function (res) {
				alert('wx.onMenuShareTimeline:fail: '+JSON.stringify(res));
			}
		});
		wx.onMenuShareAppMessage({//分享给朋友
			title: title,
			desc: desc,
			link: link,
			imgUrl: imgurl,
			trigger: function (res) {
			},
			success: function (res) {
				alert('分享成功');
			},
			cancel: function (res) {
				alert('已取消');
			},
			fail: function (res) {
				alert('wx.onMenuShareAppMessage:fail: '+JSON.stringify(res));
			}
		});
	});
</script>